# 作者：我只是代码的搬运工
# coding:utf-8
from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField, TextAreaField
from wtforms.validators import DataRequired, Length


# 主页面的表单
# 设置中文表单
class MyBaseForm(FlaskForm):
    class Meta:
        locales = ['zh']


class HelloForm(FlaskForm):
    name = StringField('用户名', validators=[DataRequired(), Length(1, 20)])
    body = TextAreaField('留言内容', validators=[DataRequired(), Length(1, 200)])
    submit = SubmitField('发布')
